package com.ruoyi.business.service.impl;

import com.ruoyi.business.mapper.WsdClassesMapper;
import com.ruoyi.business.service.IWsdClassesService;
import com.ruoyi.common.core.domain.entity.WsdClasses;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 班级信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-14
 */
@Service
public class WsdClassesServiceImpl implements IWsdClassesService
{
    @Autowired
    private WsdClassesMapper wsdClassesMapper;

    /**
     * 查询班级信息
     * 
     * @param id 班级信息主键
     * @return 班级信息
     */
    @Override
    public WsdClasses selectWsdClassesById(Long id)
    {
        return wsdClassesMapper.selectWsdClassesById(id);
    }

    /**
     * 查询班级信息列表
     * 
     * @param wsdClasses 班级信息
     * @return 班级信息
     */
    @Override
    public List<WsdClasses> selectWsdClassesList(WsdClasses wsdClasses)
    {
        return wsdClassesMapper.selectWsdClassesList(wsdClasses);
    }

    /**
     * 新增班级信息
     * 
     * @param wsdClasses 班级信息
     * @return 结果
     */
    @Override
    public int insertWsdClasses(WsdClasses wsdClasses)
    {
        wsdClasses.setCreateTime(DateUtils.getNowDate());
        return wsdClassesMapper.insertWsdClasses(wsdClasses);
    }

    /**
     * 修改班级信息
     * 
     * @param wsdClasses 班级信息
     * @return 结果
     */
    @Override
    public int updateWsdClasses(WsdClasses wsdClasses)
    {
        wsdClasses.setUpdateTime(DateUtils.getNowDate());
        return wsdClassesMapper.updateWsdClasses(wsdClasses);
    }

    /**
     * 批量删除班级信息
     * 
     * @param ids 需要删除的班级信息主键
     * @return 结果
     */
    @Override
    public int deleteWsdClassesByIds(Long[] ids)
    {
        return wsdClassesMapper.deleteWsdClassesByIds(ids);
    }

    /**
     * 删除班级信息信息
     * 
     * @param id 班级信息主键
     * @return 结果
     */
    @Override
    public int deleteWsdClassesById(Long id)
    {
        return wsdClassesMapper.deleteWsdClassesById(id);
    }
}
